<?
require("config.php");

$location_status .= " | Edit";

$show_backnav = "menu";

require($rela_path . "bin/country.php");

$menutype = 2;

if (NULL!=$action){


   $field = array(
	  "code",
	  "content",
	  "testimonial",
	  "publish",
	  "description1",
	  "currency1",
	  "fee1",
	  "publish1",
	  "description2",
	  "currency2",
	  "fee2",
	  "publish2",
	  "description3",
	  "currency3",
	  "fee3",
	  "publish3",
	  "description4",
	  "currency4",
	  "fee4",
	  "publish4",
	  "description5",
	  "currency5",
	  "fee5",
	  "publish5",
	  "description6",
	  "currency6",
	  "fee6",
	  "publish6",
	  "description7",
	  "currency7",
	  "fee7",
	  "publish7",
	  "description8",
	  "currency8",
	  "fee8",
	  "publish8",
	  "description9",
	  "currency9",
	  "fee9",
	  "publish9",
	  "description10",
	  "currency10",
	  "fee10",
	  "publish10",
	);

   $content = array(
		$Code,
		$Content,
		$Testimonial,
		$Publish,
		$Description1,
		$Currency1,
		$Fee1,
		$Publish1,
		$Description2,
		$Currency2,
		$Fee2,
		$Publish2,
		$Description3,
		$Currency3,
		$Fee3,
		$Publish3,
		$Description4,
		$Currency4,
		$Fee4,
		$Publish4,
		$Description5,
		$Currency5,
		$Fee5,
		$Publish5,
		$Description6,
		$Currency6,
		$Fee6,
		$Publish6,
		$Description7,
		$Currency7,
		$Fee7,
		$Publish7,
		$Description8,
		$Currency8,
		$Fee8,
		$Publish8,
		$Description9,
		$Currency9,
		$Fee9,
		$Publish9,
		$Description10,
		$Currency10,
		$Fee10,
		$Publish10,
	);

   $exp = "id='$id'";

   myUpdate($table,$field,$content,$exp);


   header("location:" . $rela_path . "share/msg.php?v=762&Start_Num=" . $Start_Num);

   exit();

}


$Query = "select 
	  code,
	  content,
	  testimonial,
	  publish,
	  description1,
	  currency1,
	  fee1,
	  publish1,
	  description2,
	  currency2,
	  fee2,
	  publish2,
	  description3,
	  currency3,
	  fee3,
	  publish3,
	  description4,
	  currency4,
	  fee4,
	  publish4,
	  description5,
	  currency5,
	  fee5,
	  publish5,
	  description6,
	  currency6,
	  fee6,
	  publish6,
	  description7,
	  currency7,
	  fee7,
	  publish7,
	  description8,
	  currency8,
	  fee8,
	  publish8,
	  description9,
	  currency9,
	  fee9,
	  publish9,
	  description10,
	  currency10,
	  fee10,
	  publish10 
from $table where id='$id' Limit 1";
$r = myQuery($Query);


		$Code=$r[0][0];
		$Content=$r[0][1];
		$Testimonial=$r[0][2];
		$Publish=$r[0][3];
		$Description1=$r[0][4];
		$Currency1=$r[0][5];
		$Fee1=$r[0][6];
		$Publish1=$r[0][7];
		$Description2=$r[0][8];
		$Currency2=$r[0][9];
		$Fee2=$r[0][10];
		$Publish2=$r[0][11];
		$Description3=$r[0][12];
		$Currency3=$r[0][13];
		$Fee3=$r[0][14];
		$Publish3=$r[0][15];
		$Description4=$r[0][16];
		$Currency4=$r[0][17];
		$Fee4=$r[0][18];
		$Publish4=$r[0][19];
		$Description5=$r[0][20];
		$Currency5=$r[0][21];
		$Fee5=$r[0][22];
		$Publish5=$r[0][23];
		$Description6=$r[0][24];
		$Currency6=$r[0][25];
		$Fee6=$r[0][26];
		$Publish6=$r[0][27];
		$Description7=$r[0][28];
		$Currency7=$r[0][29];
		$Fee7=$r[0][30];
		$Publish7=$r[0][31];
		$Description8=$r[0][32];
		$Currency8=$r[0][33];
		$Fee8=$r[0][34];
		$Publish8=$r[0][35];
		$Description9=$r[0][36];
		$Currency9=$r[0][37];
		$Fee9=$r[0][38];
		$Publish9=$r[0][39];
		$Description10=$r[0][40];
		$Currency10=$r[0][41];
		$Fee10=$r[0][42];
		$Publish10=$r[0][43];

require($rela_path . "inc/header.php");
require($rela_path . "bin/date.php");

?>

<form action="" method="post" enctype="multipart/form-data" name="form1">
<!--hidden filed-->
<input name="action" type="hidden" value="edit">
<input name="Code" type="hidden" value="<?print($Code)?>">

<input name="old_Picture_sm" type="hidden" value="<?print($Picture_sm)?>">
<input name="old_Picture" type="hidden" value="<?print($Picture)?>">

  <table width="95%" border="0" align="center">
    <tr> 
      <td align="right"> <input name="image" type="image" onclick="Redirect('menu.php',1);return false;" src="../../images/bt_cancel.gif" width="78" height="23"> 
        <input name="image" type="image" src="../../images/bt_save.gif" width="76" height="22"  <?print($active)?>> 
      </td>
    </tr>
  </table>
  <table width="95%" border="0" align="center">
    <tr> 
      <td align="right">&nbsp; </td>
    </tr>
    <tr> 
      <td><table border="0">
          <tr> 
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr> 
            <td class="tdheader">Code :</td>
            <td> <?print($Code)?> <input type="hidden" name="Publish" value="<?=$Publish?>" /></td>
          </tr>


          <tr> 
            <td class="tdheader">Text :</td>
            <td><textarea class="text" name="Content" cols="60" rows="6"><?print($Content)?></textarea></td>
          </tr>



<?
for ($i=1;$i<11;$i++){
	
$v1 = "Currency$i";
$v2 = "Fee$i";
$v3 = "Description$i";
$v4 = "Publish$i";
	?>
<tr> 
            <td class="tdheader"><?=$i?></td>
            <td>
				<table border="0" cellpadding="0" cellspacing="0" width="100%">
				<tr><td width="30%" align="left">Description<?=$i?>:</td><td align="left"><input type="text" name="Description<?=$i?>" class="text" value="<?=$$v3?>" size="43"/></td></tr>
				<tr><td width="30%" align="left">Currency<?=$i?>:</td><td align="left"><input type="text" name="Currency<?=$i?>" class="text" value="<?=$$v1?>" size="43"/></td></tr>
				<tr><td width="30%" align="left">Fee<?=$i?>:</td><td align="left"><input type="text" name="Fee<?=$i?>" value="<?=$$v2?>" class="text" size="43"/></td></tr>
				<tr><td width="30%" align="left">Publish<?=$i?>:</td><td align="left"><input type="radio" name="Publish<?=$i?>" value="0" <?php if($$v4==0) echo " checked=\"true\""; ?>/>Yes
								<input type="radio" name="Publish<?=$i?>" value="1" <?php if($$v4==1) echo " checked=\"true\""; ?>/>No</td></tr>
			</table>
	
			</td>
          </tr>
<? } ?>
        </table>
      </td>
    </tr>
    <tr>
      <td>&nbsp;</td>
    </tr>
  </table>
  <table width="95%" border="0" align="center">
    <tr> 
      <td align="right"> <input name="image2" type="image" onclick="Redirect('menu.php',1);return false;" src="../../images/bt_cancel.gif" width="78" height="23"> 
        <input name="image2" type="image" src="../../images/bt_save.gif" width="76" height="22" <?print($active)?>> 
      </td>
    </tr>
  </table>
</form>
<?
require($rela_path . "inc/footer.php");
?>

